<!-- 1：实现火狐切换搜索的功能,当选择哪个搜索，切换对应公司的logo图片，并且更改表单的action属性，当输入值并点击搜索的时候，能去对应的网站.三个网址分别是
https://www.baidu.com,https://www.taobao.com和https://www.google.com.hk -->
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>切换搜索</title>
		<style type="text/css">
			#ss {
				position: relative;
				top: 50px;
				left: 200px;
				padding-left: 110px;
				padding-top: 5px;
			}

			#qh {
				border: none;
				height: 30px;
				width: 100px;
				position: absolute;
				top: 0px;
				left: 0px;

			}

			#b1 {
				outline: none;
				border: none;
				height: 25px;
				width: 100px;
				background-color: blue;
				color: white;
			}

			#in1 {
				height: 20px;
				width: 400px;
				border-color: blue;
			}

			#ss a {
				text-decoration: none;
				color: black;
			}
		</style>
		<script>
			var qh = document.querySelector("#qh");

			function baidu() {
				var s = document.getElementById("it");
				s.action = "https://www.baidu.com/s";
				var n = document.getElementById("in1");
				n.name = "wd";
				document.querySelector("#qh").src = 'image/baidu_web.png';
			}

			function guge() {
				document.querySelector("#qh").src = 'image/google_web.png';
				var s = document.getElementById("it");
				s.action = "https://www.google.com.hk"
				var n = document.getElementById("in1");
				n.name = "wd";
			}

			function tb() {
				document.querySelector("#qh").src = 'image/taobao_shopping.png';
				var s = document.getElementById("it");
				s.action = "https://www.taobao.com"
				var n = document.getElementById("in1");
				n.name = "search";
			}
		</script>
	</head>
	<body>
		<div id="ss">
			<img src="image/baidu_web.png" alt="" id="qh">
			<form action="http://www.baidu.com/s" method="get" id="it">
				<a href="" onclick="baidu()"><input name="Fruit" type="radio" value="" />百度 </a>
				<a href="" onclick="guge()"><input name="Fruit" type="radio" value="" />谷歌</a>
				<a href="" onclick="tb()"><input name="Fruit" type="radio" value="" />淘宝 </a>
				<input type="text" id="in1" name="wd"><button type="submit" id="b1">搜索</button><br>
			</form>
		</div>
	</body>
</html>
